package com.cysyz.sql.column.html.mapper.impl;

import com.cysyz.mylib.freemarker.FreeMarkerSupportTool;
import freemarker.template.TemplateException;

import java.io.IOException;
import java.util.*;

/**
 * Created by admin on 2015-4-23.
 */
public class TextHtmlInputMapper extends BaseColumnHtmlInputMapper {

    @Override
    protected String setTemplateName() {
        return "text.ftl";
    }

    @Override
    protected void setSupportList(List<String> supportList) {
        supportList.add("java.lang.String");
    }

    public static void main(String[] args) throws IOException, TemplateException {
        FreeMarkerSupportTool fs = new FreeMarkerSupportTool(FreeMarkerSupportTool.class.getResource("/ftl/htmlinput").getFile());
        Map<String, Object> dataMap = new HashMap<String, Object>();
        System.out.println(fs.generate("text.ftl", dataMap));
    }

}
